//
//  CZHookCode.m
//  CZHook
//
//  Created by czera on 2020/4/23.
//  Copyright © 2020 czera. All rights reserved.
//

#import "CZHookCode.h"
#import <objc/runtime.h>

@implementation CZHookCode
+(void)load
{
    NSLog(@"InjectCode+load");
    Method btn1 = class_getInstanceMethod(objc_getClass("ViewController"), @selector(btnClik1:));
     Method myBtn = class_getInstanceMethod(self, @selector(myBtn));
    method_exchangeImplementations(myBtn, btn1);
}

-(void)myBtn{
    NSLog(@"哥么HOOK住了！！");
}
@end
